package com.aijk.commons.utils;

import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ChenDeWei on 2016/6/15.
 */
public class StringArrayUtils {

    public static List<Integer> splitToIntList(String ids) {
        List<Integer> list = new ArrayList<>();
        String[] array = StringUtils.split(ids, ",");
        if (array == null) {
            return list;
        }

        for (String item : array) {
            list.add(Integer.parseInt(item));
        }
        return list;
    }
}
